<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var a = [1, 34, 6, 457, 76, 2, 66];
        var max = Math.max.apply(Math, a);
        console.log(max);
    </script>
</body>

</html>